/*
 * @Author: bankeyu-dell 573569790@qq.com
 * @Date: 2022-10-08 15:53:59
 * @LastEditors: bankeyu-dell 573569790@qq.com
 * @LastEditTime: 2022-10-13 01:04:20
 * @FilePath: \fast-vue3\src\api\translate\index.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { post } from '/@/utils/http/axios';
enum URL {
  addTranslateRelations = '/msvc/add-translate-relations', // 新增翻译接口
  delTranslateRelations = '/msvc/del-translate-relations', // 删除翻译接口
  translateRelations = '/msvc/translate-relations', // 查询翻译列表接口
}

export interface AddTranslateRelationsData {
  customerId: number;
  customerRelIds: number[];
}

export interface delTranslateRelationsData {
  customerId: number;
  customerRelIds: number[];
}

export interface IdData {
  id: number;
}

const addTranslateRelations = async (data: AddTranslateRelationsData) => post<any>({ url: URL.addTranslateRelations, data });
const delTranslateRelations = async (data: delTranslateRelationsData) => post<any>({ url: URL.delTranslateRelations, data });
const translateRelations = async (data: IdData) => post<any>({ url: URL.translateRelations, data });
export { addTranslateRelations, delTranslateRelations, translateRelations };
